//
//  HomeTableViewCell.m
//  EducationOID
//
//  Created by slz on 2017/5/9.
//  Copyright © 2017年 bnsr. All rights reserved.
//

#import "HomeTableViewCell.h"

@implementation HomeTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self){
        CALayer * lineLayer = [CALayer new];
        lineLayer.backgroundColor = kLineColor_Gray_Default.CGColor;
        lineLayer.size = CGSizeMake(kScreenWidth - 22, 0.5);
        lineLayer.left = 11;
        lineLayer.bottom = 59.5;
        [self.contentView.layer addSublayer:lineLayer];
        
        _iconImageView = [UIImageView new];
        _iconImageView.size = CGSizeMake(40,40);
        _iconImageView.left = 11;
        _iconImageView.top = 10;
        [self.contentView addSubview:_iconImageView];
        
        UIImageView * arrowImageView = [UIImageView new];
        [self.contentView addSubview:arrowImageView];
        arrowImageView.image = [UIImage imageNamed:@"icon_right_small_arrow"];
        [arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(12, 12));
            make.centerY.mas_equalTo(self.mas_centerY);
            make.right.mas_equalTo(self.mas_right).offset(-11);
        }];
        
        _mainLabel = [UILabel new];
        _mainLabel.fontSize = 14;
        [self.contentView addSubview:_mainLabel];
        [_mainLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(_iconImageView.mas_right).offset(20);
            make.centerY.mas_equalTo(_iconImageView.mas_centerY);
        }];
        _mainLabel.textColor = kDark_TextColor_Default;
    }
    return self;
}



@end
